<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>
        <!-- v-model 语法糖 -->
        视图:
        <!-- <input
          type="checkbox"
          @change="allow=$event.target.checked"
          :checked="true"
        /> -->
        <input type="checkbox" v-model="allow" />
        <br />
        数据: {{allow}}
        <br />
        视图:
        <input type="checkbox" true-value="yes" false-value="no" v-model="allow2"/>
        <br />
        数据: {{allow2}}
      </p>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          allow: true,
          allow2: "yes",
        },
        methods: {
          say(e) {
            console.log("hello");
          },
        },
      });
    </script>
  </body>
</html>
